﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
		String typeS = Request.QueryString["t"];
		if (typeS!=null && typeS!="")
		{
			ArchiveType type = (ArchiveType)Int32.Parse(typeS);
			String keyword = Convert.ToString(Request.QueryString["q"]);
			Int32 curPage;
			if (!Int32.TryParse(Convert.ToString(Request.QueryString["cp"]), out curPage))
				curPage = 0;
			searchResult.InnerHtml = ArchiveMan.Search(type, keyword, curPage);
			q.Value = keyword;
		}
		navMenu.InnerHtml = GUI.NavMenu(PageClass.Default);
    }
}
